package com.ziyueyuwen.xiniao.service;

import com.alibaba.fastjson.JSONObject;
import com.ziyueyuwen.xiniao.bean.trial.TrialClassVO;
import com.ziyueyuwen.xiniao.bean.trial.ZyTrialClassDO;

/**
 * @author jun 2019/3/7
 */
public interface TrialClassService {

    /**
     * 添加体验课的课程和课节
     *
     * @param zyTrialClassDO ZyTrialClassDO
     * @return Boolean
     * @throws Exception Exception
     */
    Boolean add(ZyTrialClassDO zyTrialClassDO) throws Exception;

    /**
     * 编辑体验课的课程和课节
     *
     * @param zyTrialClassDO ZyTrialClassDO
     * @return Boolean
     * @throws Exception Exception
     */
    Boolean update(ZyTrialClassDO zyTrialClassDO) throws Exception;

    /**
     * 根据课程id获取数据
     *
     * @param pageNum  Integer
     * @param pageSize Integer
     * @param courseId Integer
     * @return List<ZyTrialClassDO>
     */
    JSONObject listByCourseId(Integer pageNum, Integer pageSize, Integer courseId);

    /**
     * 根据id获取数据
     *
     * @param id Integer
     * @return TrialClassVO
     */
    TrialClassVO getById(Integer id);

    /**
     * 根据id删除数据
     *
     * @param id Integer
     * @return Boolean
     * @throws Exception Exception
     */
    Boolean deleteById(Integer id) throws Exception;
}
